import request from '../utils/request';
import { remoteAddress } from './ip';

export async function addCourse(params) {
  return request(remoteAddress('/basic/course/add'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function deleteCourse(params) {
  return request(remoteAddress('/basic/course/delete'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function updateCourse(params) {
  return request(remoteAddress('/basic/course/update'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function queryCourse(params) {
  return request(remoteAddress('/basic/course/listall'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
